package guoanmaker.personal.business.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import guoanmaker.personal.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
 * 
* @ClassName: PersonalInvoice 
* @Description: 发票实体,与用户相关联,多对一
* @author Yvonne_MGL
* @date 2017年7月6日 下午3:48:22 
*  
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_personal_invoice")
public class PersonalInvoice extends IdEntity{
	private String invoiceName;//单位名称
	private String taxNumber;//纳税人识别号
	private String invoiceType;//发票类型  0为普通发票   1为专用发票
	private String telephone;//注册电话
	private String address;//注册地址
	private String bankName;//开户银行
	private String bankNumber;//银行账户
	private String businessLicensePic;//营业执照副本图片上传地址
	private String businessPic;//营业执照图片上传地址 
	private String isdefault;//是否为默认发票,1为是,0为否
	
	@ManyToOne(cascade=CascadeType.REFRESH,optional=false)
	@JoinColumn(name = "user_id")
	private PersonalUser user;//关联用户

}
